<?php

/**
 * AbetAddDeleModif form base class.
 *
 * @method AbetAddDeleModif getObject() Returns the current form's model object
 *
 * @package    sfproject
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseAbetAddDeleModifForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'                  => new sfWidgetFormInputHidden(),
      'secton_number'       => new sfWidgetFormPropelChoice(array('model' => 'AbetSectionCourse', 'add_empty' => false)),
      'course_Code'         => new sfWidgetFormPropelChoice(array('model' => 'AbetPlanStudy', 'add_empty' => false, 'key_method' => 'getCode')),
      'stutent_Code'        => new sfWidgetFormPropelChoice(array('model' => 'AbetStudent', 'add_empty' => false, 'key_method' => 'getCode')),
      'instructor_Code'     => new sfWidgetFormPropelChoice(array('model' => 'AbetInstructor', 'add_empty' => false, 'key_method' => 'getCode')),
      'student_Request_for' => new sfWidgetFormInputText(),
      'advisor_Answer'      => new sfWidgetFormInputText(),
      'advisor_Explination' => new sfWidgetFormInputText(),
      'created_at'          => new sfWidgetFormDateTime(),
      'updated_at'          => new sfWidgetFormDateTime(),
    ));

    $this->setValidators(array(
      'id'                  => new sfValidatorChoice(array('choices' => array($this->getObject()->getId()), 'empty_value' => $this->getObject()->getId(), 'required' => false)),
      'secton_number'       => new sfValidatorPropelChoice(array('model' => 'AbetSectionCourse', 'column' => 'id')),
      'course_Code'         => new sfValidatorPropelChoice(array('model' => 'AbetPlanStudy', 'column' => 'code')),
      'stutent_Code'        => new sfValidatorPropelChoice(array('model' => 'AbetStudent', 'column' => 'code')),
      'instructor_Code'     => new sfValidatorPropelChoice(array('model' => 'AbetInstructor', 'column' => 'code')),
      'student_Request_for' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'advisor_Answer'      => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'advisor_Explination' => new sfValidatorString(array('max_length' => 20, 'required' => false)),
      'created_at'          => new sfValidatorDateTime(array('required' => false)),
      'updated_at'          => new sfValidatorDateTime(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('abet_add_dele_modif[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'AbetAddDeleModif';
  }


}
